/*
 * NewHandlerInterface.h
 *
 *  Created on: Oct 28, 2012
 *      Author: Federico Orquera
 */

#ifndef NEWHANDLERINTERFACE_H_
#define NEWHANDLERINTERFACE_H_

#include "../bplusnodes/NewNode.h"

template <
	typename nodeID,
	typename nodeLevel,
	typename keyTemplate,
	typename valueTemplate,
	bool keyComparator(
		const keyTemplate& key1,
		const keyTemplate& key2
	)
>
	class NewHandlerInterface {

public:

	typedef std::shared_ptr< NewNode <keyTemplate, valueTemplate, keyComparator> > node_ptr;

	NewHandlerInterface(){}
	virtual ~NewHandlerInterface(){}
	virtual node_ptr getNewRoot( const nodeLevel& level ) = 0;
	virtual node_ptr getRoot() 	  = 0;
	virtual node_ptr getNewNode	( const nodeLevel& level ) = 0;
	virtual node_ptr getNode	( const nodeID& id ) = 0;
	virtual void saveNode		( const node_ptr& node ) = 0;
	virtual void deleteNode		( const nodeID& id ) = 0;

};

#endif /* NEWHANDLERINTERFACE_H_ */
